﻿using FairyGUI;
using UnityEngine;

namespace FrameWork.Plugins.HollowJ.common
{
    public class LuaHelper
    {
        public static void SetLayersRecursively(GameObject gameObject, int layer)
        {
            foreach (Transform tran in gameObject.GetComponentsInChildren<Transform>())
            {
                //遍历当前物体及其所有子物体
                tran.gameObject.layer = layer; //更改物体的Layer层
            }
        }
    }
}